<template>
	<view class="user-agreement-wrapper">
		<view class="user-agreement-content conteainer-public-style mg24">
			{{ policy }}
		</view>
	</view>
</template>

<script lang="ts">
import { defineComponent, reactive, toRefs } from 'vue'
import { onLoad } from '@dcloudio/uni-app'

import { getPolicy } from '@/http/my'

export default defineComponent({
	setup() {
		const state = reactive({
			policy: ''
		})
		
		onLoad( async () => {
			let res = await getPolicy()
			
			if(res.code === 0) {
				state.policy = res.data.data
			}
		})
		
		return {
			...toRefs(state)
		}
	}
})
</script>

<style>
	page { background-color: #f8f8fa;}
	.user-agreement-wrapper{
		font-size: 28rpx;
	}
</style>